home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / forth / pfe-0.000 / pfe-0 / pfe-0.9.13 / src / config / WATCOM / win386.mk < prev   
Encoding:
Makefile  |  1995-03-14  |  5.0 KB  |  196 lines

  1. #
  2. # Makefile ---    Makefile for Portable Forth Environment.
  3. #
  4. #        Automatically generated, if you change it next time you
  5. #        configure pfe your changes are lost. See
  6. #            src/config/your_system/
  7. #        for files to introduce permanent changes into.
  8. #
  9.  
  10.  
  11. #
  12. # WC-OS2V2/basics.mk --    Part of Makefile for PFE, defines variables used
  13. #            with Watcom C on OS/2
  14. #
  15.  
  16. c    = .c
  17. s    = .asm
  18. o    = .obj
  19. e    = .exe
  20.  
  21. eo    = /fe=
  22. oo    = /fo=
  23. d    = /d
  24. x    = \\
  25.  
  26. RM    = rm -f
  27. CP    = copy
  28. MV    = move
  29.  
  30. TRASH    = *.err *.bak *~ \#*\#
  31.  
  32.  
  33. #
  34. # WATCOM/options.mk -    Part of Makefile for PFE, compiler options
  35. #            for WATCOM-C on OS/2, DOS or Windows/NT.
  36. #
  37. # - please set the variable TARGET according to the system you want
  38. #   to build for.
  39. #
  40. # - the Makefile works with dmake in OS/2
  41. #   (dmake - Copyright (c) 1990,1991 by Dennis Vadura, Version 3.80, PL 0),
  42. #   and the way I configured it (default) dmake uses COMSPEC as command line
  43. #   interpreter which in my case is CMD.EXE.
  44. #   If you use gnu-make and/or a unix-like shell as command line interpreter,
  45. #   be prepared to get errors. One possible cause is the neccessary quoting
  46. #   of a possible `\' in $(PREFIX). I must leave it up to you to get it right.
  47. #
  48. # - when you build under DOS, be warned that the command line for the
  49. #   final link step is too long. Replace $(OBJECTS) by *.OBJ.
  50. #
  51.  
  52. # Targets -- I tried these:
  53.  
  54. #TARGET    = OS2V2        # 32 bit OS/2 text mode executable
  55. #TARGET    = DOS4G        # 32 bit DOS executable, uses Rational 4GW extender
  56.  
  57. # I didn't try these but expect them to work:
  58.  
  59. #TARGET    = ERGO        # 32 bit Ergo DOS extender executables
  60. #TARGET    = PHARLAP    # 32 bit Pharlap DOS extender executables
  61.  
  62. # These will need some changes in term-wat.c:
  63.  
  64.  TARGET = WINDOWS    # 32 bit Windows executable, specify /l=WIN386
  65. #TARGET = NT        # 32 bit NT character mode executable
  66. #TARGET = QNX386    # 32 bit QNX executable
  67.  
  68. # There are more possible targets mentioned in the Watcom manual but
  69. # I haven't heard of them before so I can't tell anything about them.
  70.  
  71. # Where you store online help files and other stuff.
  72. PREFIX    = "C:"        # define a C-string, path names two `\∩ inside ""
  73.  
  74.  
  75. SYSTEM    = WATCOM
  76. CC    = wcc386
  77. CL    = wcl386
  78. LD    = $(CL)
  79.  
  80. # /bt=    target OS for wcc386
  81. # /w4    highest possible warning level
  82. # /zq    supress signon messages
  83. # /zc    place const objects and strings in the code segment
  84. # /d    define target as preprocessor symbol
  85. OPTIONS    = /bt=$(TARGET) /w4 /zq /zc /dWC_$(TARGET)
  86.  
  87. # Recommended in the Watcom manual for best speed:
  88. # /omaxnet
  89. # /5r    optimize for Pentium and use registers for parameter passing
  90. # /zp4    align data on 4 byte boundaries
  91. OPTIM    = /omaxnet /5r /zp4
  92.  
  93. DEBUG    = /d2
  94.  
  95. # /l=    target OS for wcl386
  96. # /x    make names case sensitive (maybe useless, seems not to hurt)
  97. LFLAGS    = /l=WIN386 /x
  98.  
  99. STRIP    = 
  100.  
  101. LIBS    = 
  102.  
  103. TERM_O    = term-wat$o
  104. SYS_O    = os2$o
  105.  
  106.  
  107. #
  108. # WC-OS2V2/rules.mk ---    Part of Makefile for PFE, rules to build with Watcom C
  109. #
  110.  
  111. %$o : %$c
  112.         $(CC) $(CFLAGS) $< /fo=$@
  113.  
  114. %$e : %$o
  115.         $(LD) $(LFLAGS) $< $(LIBS) /fe=$@
  116.  
  117. %$e : %$c
  118.         $(LD) $(CFLAGS) $(LFLAGS) $< $(LIBS) /fe=$@
  119.  
  120.  
  121. #
  122. # default/depend.mk ---    Part of Makefile for PFE: dependencies.
  123. #
  124.  
  125. # if you want a final optimized version uncomment these lines:
  126. CFLAGS =    $(OPTIONS) $(OPTIM) $(d)PREFIX=$(PREFIX)
  127. LDFLAGS =    $(STRIP) $(LFLAGS)
  128.  
  129. # if you want a version for C-level debugging uncomment these lines:
  130. #CFLAGS =    $(OPTIONS) $(DEBUG) $(d)PREFIX=$(PREFIX)
  131. #LDFLAGS =    $(DEBUG) $(LFLAGS)
  132.  
  133.  
  134. # object files that should be clean ANSI-C:
  135. ANSOBJ =    core$o block$o double$o xception$o facility$o file$o \
  136.         floating$o locals$o memory$o toolkit$o search$o string$o \
  137.         forth-83$o lpf83$o misc$o showhelp$o debug$o dblsub$o \
  138.         support$o dictnry$o vocs$o lined$o term$o
  139.  
  140. # object files containing environmental dependencies:
  141. ENVOBJ =    main$o $(TERM_O) 4ed$o signals$o sysdep$o $(SYS_O) shell$o \
  142.         yours$o
  143.  
  144. OBJECTS =    $(ANSOBJ) $(ENVOBJ)
  145.  
  146. HEADERS =    forth.h config.h virtual.h options.h const.h types.h macros.h \
  147.         support.h preload.h compiler.h dblsub.h term.h help.h lined.h
  148.  
  149.  
  150. pfe$e:        $(OBJECTS) version$o
  151.         $(CL) $(LDFLAGS) /fe=pfe $(OBJECTS) version$o $(LIBS)
  152.         wbind pfe -n -s d:\watcom\binw\win386.ext
  153.  
  154. $(OBJECTS):    $(HEADERS)
  155. $(ENVOBJ):    $(HEADERS) nonansi.h
  156.  
  157. version$o:    $(OBJECTS)
  158.  
  159. all:        pfe$e helpidx$e showhelp$e
  160.  
  161. clean:
  162.         $(RM) pfe$e helpidx$e showhelp$e *$o $(TRASH)
  163.  
  164. new:        clean all
  165.  
  166. veryclean:    clean
  167.         $(RM) config.h Makefile
  168.  
  169. testit:        pfe$e
  170.         ( cd ..$(x)test; .$(x)do-tests )
  171.  
  172.  
  173. # Rules for the standalone help programs:
  174.  
  175. helpidx$e:    helpidx$o helpsub$o
  176.         $(CL) $(LDFLAGS) $(eo)helpidx$e helpidx$o helpsub$o
  177.  
  178. showhelp$e:    showhlps$o helpsub$o
  179.         $(CL) $(LDFLAGS) $(eo)showhelp$e showhlps$o helpsub$o
  180.  
  181. showhlps$o:    showhelp.c $(HEADERS)
  182.         $(CC) $(CFLAGS) $(d)STANDALONE -c showhelp.c $(oo)showhlps$o
  183.  
  184. helpidx$o:    helpidx.c $(HEADERS)
  185.         $(CC) $(CFLAGS) $(d)STANDALONE -c helpidx.c $(oo)helpidx$o
  186.  
  187. helpsub$o:    helpsub.c $(HEADERS)
  188.         $(CC) $(CFLAGS) $(d)STANDALONE -c helpsub.c $(oo)helpsub$o
  189.  
  190. install:    all
  191.         if [ ! -d $(PFELIB) ]; then mkdir $(PFELIB); fi        ;\
  192.         if [ ! -d $(PFEHLP) ]; then mkdir $(PFEHLP); fi        ;\
  193.         $(CP) helpidx$e showhelp$e ..$(x)help$(x)*.hlp $(PFEHLP);\
  194.         cd $(PFEHLP)                        ;\
  195.         helpidx$e -o $(PFEHLP)$(x)index *.hlp
  196.